\lstset{
	language=Java,
	caption={Examples for rules},
	basicstyle=\tiny,
	label=exampleforrules,
	tabsize=2
}
\begin{lstlisting}[frame=single]
// Example that does meet the rules
if (cissFltIn.hasPrefix()) {
	cdmFltOut.setPrefix(cissFltIn.getPrefix());
}
// Example that does NOT meet the rules
// The getter in the options is a different field
if (cissFltIn.hasPrefix()) {
	cdmFltOut.setPrefix(cissFltIn.getAcreg());
}
// Example that does NOT meet the rules
// The boolean expression contains an infix expression
if (cissFltIn.hasAcreg() && cissFltIn.hasPrefix()) {
	cdmFltOut.setPrefix(cissFltIn.getPrefix());
}
\end{lstlisting}